﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Personalplaner.Modules.Personoverview
{
	public partial class OverviewSelector : UserControl
	{
		public event EventHandler JahresplanClick;
		public event EventHandler HolidayClick;
		public event EventHandler DiversClick;

		public OverviewSelector()
		{
			InitializeComponent();
		}

		private void OverviewSelector_Load(object sender, EventArgs e)
		{
			CenterImages();
		}

		private void CenterImages()
		{
			int x = ((this.Width / 2) - (btnJahresplan.Width / 2));

			btnJahresplan.Location = new Point(x, btnJahresplan.Location.Y);
			btnHoliday.Location = new Point(x, btnHoliday.Location.Y);
			btnDivers.Location = new Point(x, btnDivers.Location.Y);

			label1.Location = new Point((this.Width / 2) - (label1.Width / 2), label1.Location.Y);
			label2.Location = new Point((this.Width / 2) - (label2.Width / 2), label2.Location.Y);
			label3.Location = new Point((this.Width / 2) - (label3.Width / 2), label3.Location.Y);
		}

		private void btnJahresplan_Click(object sender, EventArgs e)
		{
			if (JahresplanClick != null)
				JahresplanClick(sender, e);
		}

		private void btnHoliday_Click(object sender, EventArgs e)
		{
			if (HolidayClick != null)
				HolidayClick(sender, e);
		}

		private void btnDivers_Click(object sender, EventArgs e)
		{
			if (DiversClick != null)
				DiversClick(sender, e);
		}
	}
}
